package com.pango.core.security;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

/**
 * 用户获取用户信息的工具类
 * @author thierry.fu
 *
 */
public class UserContext {
	
	public static UserDetails getCurrentUser() {
		//获取Shiro中的Principal信息
		Subject subject = SecurityUtils.getSubject();
		return (UserDetails)subject.getPrincipal();
	}
}
